package com.ruoyi.system.mapper;

import java.util.List;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.KnowledgeVo;
import com.ruoyi.system.domain.Knowledgepool;

/**
 * knowledgepoolMapper接口
 *
 * @author ruoyi
 * @date 2023-08-22
 */
public interface KnowledgepoolMapper {
    /**
     * 查询knowledgepool
     *
     * @param id knowledgepool主键
     * @return knowledgepool
     */
    public Knowledgepool selectKnowledgepoolById(Long id);

    /**
     * 查询knowledgepool列表
     *
     * @param knowledgepool knowledgepool
     * @return knowledgepool集合
     */
    public List<Knowledgepool> selectKnowledgepoolList(Knowledgepool knowledgepool);

    /**
     * 新增knowledgepool
     *
     * @param knowledgepool knowledgepool
     * @return 结果
     */
    public int insertKnowledgepool(KnowledgeVo knowledgepool);

    /**
     * 修改knowledgepool
     *
     * @param knowledgepool knowledgepool
     * @return 结果
     */
    public int updateKnowledgepool(Knowledgepool knowledgepool);

    /**
     * 删除knowledgepool
     *
     * @param id knowledgepool主键
     * @return 结果
     */
    public int deleteKnowledgepoolById(Long id);

    /**
     * 批量删除knowledgepool
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteKnowledgepoolByIds(String[] ids);


    public Long findId();


    public Knowledgepool selectKnowledgepoolByIdAndDate(Long id);


    /**
     * 排行榜
     * likeCount   点赞数
     * pageViews    浏览次数
     * collectionCount   收藏数
     * commentCount    评论数
     *
     * @param order
     * @return
     */
    List<Knowledgepool> getKnowledgeByHotRank(String order);


    AjaxResult<Knowledgepool> updateKnowledgepoolLike(Long uid);
}
